package Tools.FunctionInterface;

import java.util.Arrays;
import java.util.function.Supplier;

public class SupplierTest {
    public static void main(String[] args) {
        fun(() -> {
            int arr[] = {14,23,54,56,67,78};
            Arrays.sort(arr);
            return arr[arr.length-1];
        });
    }


    private static void fun(Supplier<Integer> supplier){
        Integer integer = supplier.get();
        System.out.println(integer);
    }
}
